import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

public class SysIn {

    public static ArrayList<String> read(String filePath) {
        BufferedReader br = null;
        ArrayList<String> lines = new ArrayList<>();
        try {
            br = new BufferedReader(new FileReader(filePath));
            String line;
            while ((line = br.readLine()) != null) {
                lines.add(line + "\n");
            }
        } catch (IOException e) {
            System.err.println("MyError reading file " + filePath);
        } finally {
            try {
                assert br != null;
                br.close();
            } catch (IOException e) {
                System.err.println("MyError reading file " + filePath);
            }
        }
        return lines;
    }
}
